package com.me.myFramework.aop22.aop120.intercept.method;

import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;

/**
 * 《AOP-120》：  <br><br>
 *
 * TODO 以下变更点：
 *  把 MethodInterceptor 接口中散装参数（代理对象、目标对象、目标方法、方法参数）封装到这里。<br>
 */
public class ReflectiveMethodInvocation120 implements MethodInvocation120 {

    /** 代理对象 */
    private Object proxy;
    /** 目标对象 */
    private Object target;
    /** 要执行的目标方法 */
    private Method method;
    /** 目标方法的入参 */
    private Object[] args;

    public ReflectiveMethodInvocation120(Object proxy, Object target, Method method, Object[] args) {
        this.proxy = proxy;
        this.target = target;
        this.method = method;
        this.args = args;
    }

    @Override
    public Object proceed() throws Throwable {
        return null;
    }

    @Override
    public Object getThis() {
        return this.target;
    }

    @Override
    public Method getMethod() {
        return this.method;
    }

    @Override
    public Object[] getArguments() {
        return this.args;
    }

    @Override
    public AccessibleObject getStaticPart() {
        return null;
    }

}
